import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import { FormModel } from 'ant-design-vue';
import moment from 'moment';
import 'moment/locale/zh-cn';
import http from './request/http'
import VueKonva from 'vue-konva'
import Print from 'vue-print-nb'
import vcolorpicker from 'vcolorpicker'
import * as utils from './utils/index'//公用方法
moment.locale('zh-cn');
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
Viewer.setDefaults({
  Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
})

utils.setStoreUserInfo();//将localStorage的用户信息存在store中

Vue.use(Print);
Vue.use(antd)
Vue.use(FormModel);
Vue.use(VueKonva);
Vue.use(vcolorpicker)

Vue.prototype.$loading = utils.loading;
Vue.prototype.$renderTime = utils.renderTime;
Vue.prototype.$setUrl = utils.setUrl;
Vue.prototype.$getType = utils.getType;
Vue.prototype.$sliceTime = utils.sliceTime;
Vue.prototype.$downloadFile = utils.downloadFile;
Vue.prototype.$listNum = utils.listNum;
Vue.prototype.$url = `${window.location.origin}/SHGL/admin/index.html#/`;
Vue.config.productionTip = false

new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
